package com.kfm.serivce.impl;

import com.kfm.dao.StudentDao;
import com.kfm.serivce.StudentService;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao;

    public StudentServiceImpl(){}

    public StudentServiceImpl(StudentDao dao){
        this.dao = dao;
    }

    public void setDao(StudentDao dao) {
        this.dao = dao;
    }

    @Override
    public int saveStudent() {
        // 数据有效性校验 等业务处理

        // 使用持久层保存数据
        return dao.insert();
    }
}
